Skip to main content

Building, Wiring and Assembly

In this section, the 3D printed components and wiring of the emoji cube circuit is explained.

Emoji Cube Casing

The emoji cube consists of three 3D printed parts;

To use the 3D models, download the STL files and slice the model using a software of your choice (eg. Cura). The output form the slicing software (.gx file) is then loaded into the 3D printer and you can print the parts.

Move the 3D Model

The above 3D model is interactive! Move the mouse over and left-click to change the prespective. Use the scroll wheel to zoom.

Wiring

LEDs

The positive terminal of each LED is connected to a 100 ohms resistor which is wired directly to a GPIO pin on the AVR128DB48. The negative terminal is connected to GND pin on the microcontroller. In this demo, the LEDS are wired to pins D9, D6 and D5 on the AVR-IoT-Cellular Mini board which correspond to pins PD0, PE1 and PE2 on the microcontroller.

Buttons

The tactile buttons have four terminals, out of which any two diagonal terminals can be used. One terminal is wired directly to the GPIO pins on the microcontroller while the other is grounded. The microcontroller (AVR128DA48) has the feature of pull up resistors (enabled through software) on it's GPIO pins and hence eliminates the need for additional resistors in the switch/button circuitry. In this demo, the buttons are wired to A1, A2 and A3 on the AVR-IoT-Cellular Mini board which correspond to pins PD1, PD3 and PD4 on the microcontroller.

Wire buttons to a single port

The buttons act as inputs which generate interrupts, for the purpose of this demo. Hence, connecting all the buttons to the same port pins (eg. PORTD) on the microcontroller allows you to address the interrupts in a single ISR (Interrupt Service Routine).

Battery

The cubes can be powered by a battery (recommended 3.3V, 2000 mAH) by simply plugging it into the battery connector on the board. The AVR-IoT-Cellular Mini board has on-board battery charging circuitry, making it easier to implement your battery powered design.

Wiring diagram

Follow the circuit shown below to wire the emoji cube :

Assembly

  • Step 1: The first step is to solder the buttons onto a perfboard, making sure to place them equidistant from each other and aligned to the button holes on the case. Next, connect all the ground terminals (pick any leg of the button) to a common ground point on the perfboard and connect a jumper wire (with a female connector at one end) to the ground point. Also attach three jumper wires (female connector at one end) to each input leg (diagonally opposite to ground) of the button to connect them to the pins on the microcontroller.
note

Use short wires since there isn't a lot of space between the components in the emoji cube

  • Step 2: Solder a 100 ohms resistor to the positive leg of each LED. The negative terminals of the LEDs can be soldered on to the perfboard alongside the buttons and connected to the common ground point as shown in the image below.
  • Step 3: The buttons, LEDs and AVR-IoT-Cellular Mini board can be positioned within the case, starting with the perfboard and LEDs. To complete the connections between components, connect the jumpers to corresponding pins on the microcontroller, as depicted in the wiring diagram.

Now that all the parts have been assembled in the case, you can snap fit the top and side lids of the emoji cube and connect the USB-C cable to the board to start programming. The next section provides an overview of the software used in this demo.